package com.ruoyi.mall.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.mall.api.domian.Product;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单对象 orders
 * 
 * @author luogongquan
 * @date 2024-10-16
 */
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long customerId;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal amount;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal freightAmount;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal promotionAmount;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    /** 订单状态（例如：待处理、已确认、已发货、已完成、已取消） */
    @Excel(name = "订单状态", readConverterExp = "例=如：待付款、已付款/待发货、已发货、已完成、已取消")
    private String status;

    /** 快递追踪号 */
    @Excel(name = "快递追踪号")
    private Integer trackingNumber;

    /** 下单日期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date orderDate;
    /** 支付日期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paymentDate;
    /** 支付日期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date shipmentsDate;
    /** 收货方式（1：物流  2：到店自取） */
    @Excel(name = "收货方式", readConverterExp = "1=邮递到家，2=到店自取 3=送货上门")
    private String shippingMethod;

    /** 取货地点id */
    @Excel(name = "取货地点id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long deptId;

    /** 收货人 */
    @Excel(name = "收货人")
    private String receiverName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String receiverPhone;

    /** 收货人省 */

    private String receiverProvince;
    @Excel(name = "收货人省")
    private String receiverProvinceName;

    /** 收货人市 */

    private String receiverCity;
    @Excel(name = "收货人市")
    private String receiverCityName;

    /** 收货人区 */

    private String receiverRegion;
    @Excel(name = "收货人区")
    private String receiverRegionName;

    /** 收货地址 */
    @Excel(name = "收货地址")
    private String receiverAddress;

    /** 是否删除( 0:未删除，2：已删除) */
    private String delFlag;

    /** 微信支付订单号 */
    private String prepayId;


    private List<Product> productList;

    public Date getShipmentsDate() {
        return shipmentsDate;
    }

    public void setShipmentsDate(Date shipmentsDate) {
        this.shipmentsDate = shipmentsDate;
    }

    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }

    public String getReceiverProvinceName() {
        return receiverProvinceName;
    }

    public void setReceiverProvinceName(String receiverProvinceName) {
        this.receiverProvinceName = receiverProvinceName;
    }

    public String getReceiverCityName() {
        return receiverCityName;
    }

    public void setReceiverCityName(String receiverCityName) {
        this.receiverCityName = receiverCityName;
    }

    public String getReceiverRegionName() {
        return receiverRegionName;
    }

    public void setReceiverRegionName(String receiverRegionName) {
        this.receiverRegionName = receiverRegionName;
    }

    public List<Product> getProductList() {
        return productList;
    }

    public void setProductList(List<Product> productList) {
        this.productList = productList;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }
    public void setFreightAmount(BigDecimal freightAmount) 
    {
        this.freightAmount = freightAmount;
    }

    public BigDecimal getFreightAmount() 
    {
        return freightAmount;
    }
    public void setPromotionAmount(BigDecimal promotionAmount) 
    {
        this.promotionAmount = promotionAmount;
    }

    public BigDecimal getPromotionAmount() 
    {
        return promotionAmount;
    }
    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setTrackingNumber(Integer trackingNumber) 
    {
        this.trackingNumber = trackingNumber;
    }

    public Integer getTrackingNumber() 
    {
        return trackingNumber;
    }
    public void setOrderDate(Date orderDate) 
    {
        this.orderDate = orderDate;
    }

    public Date getOrderDate() 
    {
        return orderDate;
    }
    public void setShippingMethod(String shippingMethod) 
    {
        this.shippingMethod = shippingMethod;
    }

    public String getShippingMethod() 
    {
        return shippingMethod;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setReceiverName(String receiverName) 
    {
        this.receiverName = receiverName;
    }

    public String getReceiverName() 
    {
        return receiverName;
    }
    public void setReceiverPhone(String receiverPhone) 
    {
        this.receiverPhone = receiverPhone;
    }

    public String getReceiverPhone() 
    {
        return receiverPhone;
    }
    public void setReceiverProvince(String receiverProvince) 
    {
        this.receiverProvince = receiverProvince;
    }

    public String getReceiverProvince() 
    {
        return receiverProvince;
    }
    public void setReceiverCity(String receiverCity) 
    {
        this.receiverCity = receiverCity;
    }

    public String getReceiverCity() 
    {
        return receiverCity;
    }
    public void setReceiverRegion(String receiverRegion) 
    {
        this.receiverRegion = receiverRegion;
    }

    public String getReceiverRegion() 
    {
        return receiverRegion;
    }
    public void setReceiverAddress(String receiverAddress) 
    {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverAddress() 
    {
        return receiverAddress;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerId", getCustomerId())
            .append("amount", getAmount())
            .append("freightAmount", getFreightAmount())
            .append("promotionAmount", getPromotionAmount())
            .append("payAmount", getPayAmount())
            .append("status", getStatus())
            .append("trackingNumber", getTrackingNumber())
            .append("orderDate", getOrderDate())
            .append("shippingMethod", getShippingMethod())
            .append("deptId", getDeptId())
            .append("receiverName", getReceiverName())
            .append("receiverPhone", getReceiverPhone())
            .append("receiverProvince", getReceiverProvince())
            .append("receiverCity", getReceiverCity())
            .append("receiverRegion", getReceiverRegion())
            .append("receiverAddress", getReceiverAddress())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFlag", getDelFlag())
            .append("prepayId", getPrepayId())
            .toString();
    }
}
